package com.wangxiaonan.berry.repository;

import com.alibaba.fastjson.JSONObject;
import com.wangxiaonan.berry.config.FeignRepository;
import com.wangxiaonan.berry.entity.BaiQiShi;
import feign.Body;
import feign.Headers;
import feign.RequestLine;

/**
 * @Author: wangxiaonan
 * @Date: 2019/7/2
 **/
@FeignRepository(uriPropertyName = "bai-qi-shi-uri")
public interface BaiQiShiRepository {

    @RequestLine("POST /query")
    @Headers("Content-Type:application/json,charset=UTF-8")
    @Body("%7b\"partnerId\":\"{baiQiShi.partnerId}\",\"verifyKey\":\"{baiQiShi.verifyKey}\",\"platform\":\"{baiQiShi.platform}\",\"tokenKey\":\"{baiQiShi.tokenKey}\"%7d")
    JSONObject query(BaiQiShi baiQiShi);

    @RequestLine("POST /queryHistory")
    @Headers("Content-Type:application/json，charset=UTF-8")
    @Body("%7b\"partnerId\":\"{baiQiShi.partnerId}\",\"verifyKey\":\"{baiQiShi.verifyKey}\",\"platform\":\"{baiQiShi.platform}\",\"tokenKey\":\"{baiQiShi.tokenKey}\"%7d")
    JSONObject queryHistory(BaiQiShi baiQiShi);
}
